from loguru import logger
from conf import config


class Log:
    logger.add(config.log_path, level=config.log_level, encoding='utf-8',
    # logger.add(log_path, level=log_level, encoding='utf-8',
               enqueue=True, rotation='1 day',  # rotation多久产生一个日志文件
               retention='5 days')  # 写在日志文件里面
    debug = logger.debug
    info = logger.info
    warning = logger.warning
    error = logger.error
